import request from "/utils/omsRequest";

Page({
  data: {
    info: null,
    id: null
  },
  onLoad(query) {
    this.setData({
      id: query.id
    });
  },
  onCreateMerchant(shop) {
    dd.showLoading({
      content: '加载中...'
    });
    request({
      url: "/ajax/merchant/updateMerchant",
      method: "post",
      data: shop,
      headers: {
        "Content-Type": "application/json;utf-8"
      }
    }).then(() => {
      dd.hideLoading();
      dd.redirectTo({
        url: `/pages/contract/newContract/newContract?id=${shop.id}`
      })
    })
  }
});
